package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.EquityProps;
import com.sc.nft.entity.vo.*;
import com.sc.nft.entity.vo.secondEquityProp.EquityPropsLastConsignDetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 权益道具表(sc_equity_props)数据Mapper
 *
 * @author Sun
 * @since 2023-03-28 10:29:22
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface EquityPropsMapper extends BaseMapper<EquityProps> {

    /**
     *   后台分页查询权益道具
     * @param page
     * @param firstTitle
     * @param status
     * @param showFlag
     * @return
     */
    Page<PageAdminEquityPropsVO> getPageAdminEquityProps(Page page,@Param("firstTitle") String firstTitle,@Param("status") Boolean status,@Param("showFlag") Boolean showFlag);

    /**
     * 分页获取产品关联的权益道具
     * @param page
     * @return
     */
    Page<ProdctAssociateEquityPropsVO> prodctAssociateEquityProps(Page page,@Param("firstTitle") String firstTitle);

    Page<AirdropGrantEquityPropsVO> airdropGrantEquityProps(Page page,@Param("firstTitle") String firstTitle,@Param("typeClassify") Integer typeClassify);

    /**
     * 获取商家可用权益道具列表
     * @param page
     * @param firstTitle
     * @param type
     * @return
     */
    Page<MerchantAvailabilityListVO> getLongTermEquityPropPage(Page page, @Param("firstTitle") String firstTitle,@Param("type") Integer type);

    /**
     * 获取最新的寄售详情
     * @param equityPropsId
     * @return
     */
    EquityPropsLastConsignDetailsVO getLastConsignDetails(@Param("equityPropsId") Long equityPropsId);

    void updateNewDealPriceById(@Param("id") Long id,@Param("newDealPrice") BigDecimal newDealPrice);

    /**
     * 获取商城上架中的权益道具
     * @return
     */
    Page<MallEquityPropsVO> getMallEquityProps(Page<EquityProps> page,@Param("vistIn") Long vistIn,@Param("firstTitle") String firstTitle);
}
